-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NBSNEBIUS-148: implement throttling for fast data path #838
base: main
Are you sure you want to change the base?
Conversation
f6c268e
to
3aa34cf
Compare
Note This is an automated comment that will be appended during run. 🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit 3aa34cf.
🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 3aa34cf.
|
@@ -60,6 +61,10 @@ vhd_bdev_info TNullBackend::Init(const TOptions& options) | |||
void TNullBackend::Start() | |||
{} | |||
|
|||
void TNullBackend::PrepareStop() | |||
{ | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А в Start
и Stop
используется {}
. Давай сделаем одинаково
@@ -278,6 +279,10 @@ void TAioBackend::Start() | |||
CompletionThread = std::thread([this] { CompletionThreadFunc(); }); | |||
} | |||
|
|||
void TAioBackend::PrepareStop() | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давай здесь тоже сделаем {}
for (ui32 i = 0; i < options.QueueCount; i++) { | ||
Throttlers.push_back(CreateThrottler( | ||
Timer, | ||
options.MaxReadBandwidth / options.QueueCount, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А мы точно хотим безусловно резать полосу между очередями? Может всё-таки сделать один тротлер?
Если очередей насоздавали, но по какой-то причине не утилизируют, то мы занизим скорость пользователю в разы. А если будет даже небольшой дисбаланс, пользователь хотя бы получит всю свою полосу
private: | ||
ITimerPtr Timer; | ||
TLeakyBucket Bucket; | ||
ui32 MaxReadBandwidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const? Я не знаю есть ли от этого реальная польза, но последнее время мы что-то везде добавляем 🤷
, MaxReadIops(maxReadIops) | ||
, MaxWriteBandwidth(maxWriteBandwidth) | ||
, MaxWriteIops(maxWriteIops) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лишний певод строки
No description provided.